﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderShow.aspx.cs" Inherits="Com.CMS263.Web.manage.ManageOrder.OrderShow" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
   
    <link href="/common/validator.css" rel="stylesheet" type="text/css" />
    <link href="../style/main.css" rel="stylesheet" type="text/css" />
    <script src="../../js/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript" src="/manage/js/pager.js"></script>
    <script language ="javascript" type ="text/javascript" >
        function taos(obj) {
            var b = false;
            var tao = $(obj).val();
            var yanz = new RegExp("^[0-9]+(.[0-9]{2})?$");
            if (tao.length < 1) {
                $("#TaoSpan").html("<span  style =\"color:#FF0000\">不能为空*</span>");
                return b;
            }
            else if (!yanz.exec(myname)) {
            $("#TaoSpan").html("<span  style =\"color:#FF0000\">格式不对</span>");
            $("#Tao").arrt("val", "");
                return b;
            }
            else {
                $("#TaoSpan").html("");
                b = true;
                return b;
            }
        }
        function cons(obj) {
            var b = false;
            var con = $(obj).val();
            if (con.length < 1) {
                $("#ConSpan").html("<span  style =\"color:#FF0000\">不能为空*</span>");
                return b;
            }
            else {
                $("#ConSpan").html("");
                b = true;
                return b;
            }
        }
        function sev() {
            var b = false;
            var tao = taos($("#Tao"));
            var con = cons($("#Con"));
            if (tao && con ) {
                alert("1");
                b = true;
            }
            return b;
        }
           
        $(function(){
        $("#select1 option").each(function() {
        if($(this).attr("value")=='<%=state %>'){ 
        $(this).attr("selected","true");
        }

    })
        })


        var npage = 0;
        function checkPageNum(obj, obj2) {
            var num = $("#pagetext").val();
            var p = /^[1-9]\d*$/;

            if (num.length < 1) {
                alert("请输入要跳转的页码");

            }
            else if (!p.exec(num)) {
                $("#pagetext").attr("value", 1);
                alert("要跳转的页码请输入正整数");
            }
            else if (num > obj) {
                $("#pagetext").attr("value", obj);
                npage = obj;

            }
            else if (num < 1) {
                $("#pagetext").attr("value", 1);
                npage = 1;

            }
            else {

            }

        }
        function pageUrl(obj) {

            window.location.href = '?page=' + $("#pagetext").val() + "&type=" + obj;
        }
        $(function() {
            $("#tab tr").mouseover(function() {
                $("#tab tr").attr("className", "asd02")
                $(this).attr("className", "asd01")
            })
        })
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table id="tbReply"  width="90%" border="0" align="center" cellpadding="0"
                        cellspacing="0" class="table_1">
                        <tr>
                            <td height="23" colspan="4" class="table_2">
                                <span style="float: left">订单信息</span>
                            </td>
                        </tr>
                        <tr>
                            <td height="23" class="tdside">
                                <b>订单编号：</b>
                            </td>
                            <td height="23" colspan="3" class="tdside">
                                <asp:Label ID="labOrderId" runat="server" Text=""></asp:Label>   
                            </td>
                        </tr>
                        <tr>
                            <td height="23" class="tdside">
                                <b>订单状态：</b>
                            </td>
                            <td height="23" colspan="3" class="tdside">
                    
                                   <select name="select1" id="select1">
                              <option value ="1">审核订单</option>
                              <option value ="2">确认订单</option>
                              <option value ="3">取消订单</option>
                               <option value ="4">发货</option>
                              <option value ="5">收货</option>
                              <option value ="6">回款</option>
                              <option value ="7">退货</option>
                               <option value ="8">订单结束</option>
                              <option value ="0">删除</option>
                            </select> 
                            </td>
                           
                        </tr>
                        <tr>
                            <td height="23" style="width: 25%" class="tdside">
                                <b>总价：</b>
                            </td>
                            <td height="23" style="width: 15%" class="tdside">
                                <asp:Label ID="labtot" runat="server" Text=""></asp:Label>
                                
                            </td>
                            <td height="23" style="width: 25%" class="tdside">
                                <b>提交时间：</b>
                                <asp:Label ID="labaDtime" runat="server" Text=""></asp:Label>
                            </td>
                            <td height="23" style="width: 35%; float: left" class="tdside">
                                <b>结束时间：</b>
                                <asp:Label ID="labendTime" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td height="23" class="tdside">
                                <b>用户名：</b>
                            </td>
                            <td height="23" colspan="3" class="tdside">
                                <asp:Label ID="labUserName" runat="server" Text=""></asp:Label>  
                            </td>
                           
                        </tr>
                        <%if (deal.Type != 0) %>
                        <%{ %>
                        
                        <tr>
                            <td height="23" class="tdside">
                            <%if (deal.Type == 1) %>
                            <%{ %>
                            <b>地址：</b>
                            <%} %>
                             <%if (deal.Type == 1) %>
                            <%{ %>
                            <b>电话：</b>
                            <%} %>
                                
                            </td>
                            <td height="23" colspan="3" class="tdside">
                                <input id="Con" name ="Con" type="text" value ="<%=deal.TypeCon %>" onblur ="cons(this)" /> 
                                 <span id="ConSpan" ></span>
                            </td>
                        </tr>
                        <%} %>
                        <tr>
                            <td height="23" colspan="4" class="tdside" align="center">
                                
                                <input type="hidden" name="iid" id="iid" value="<%=deal.Id %>" />
                                <asp:Button ID="btnReply" runat="server" Style="width: 70px" OnClientClick ="return sev()"
                                 OnClick="btnReply_Click" Text="提交修改" />
                            </td>
                        </tr>
                        <tr >
                        <table width="100%" id="tab">
                 <tr style="text-align:center">
                 
                 <td>产品名</td>
                 <td>图片</td> 
                 <td>单价</td>
                 <td>数量</td>
                 <td>总价</td>
                 
                 </tr>
              <%foreach (Com.CMS263.PO.OrderDetail ord in ordlist) %>
              <%{ %>
              
                <tr style="background-color:#d7f2fd; text-align:center"  >
                 <td><%=Sub (false ,10,ord .ProductTitle )%></td>
                 
                <td><img alt ="<%=ord.ProductTitle %>" src ="<%=ord.ImgUrl%>" /></td>
                 <td><%=ord.Unitprice .ToString () %></td>
                <td><%=ord.Count%></td>
                <td><%=ord.Total .ToString () %></td>
               
                </tr>
               <%} %>
           
              <tr>
              <td><div align="right">
             <%=GetPager () %>
                </div></td>
              </tr>
                </table>
                      </tr> 
                        
                    </table>
    </div>
    </form>
</body>
</html>
